<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>转换</title>

    <style>
        .item{
            width: 100px;
            height: 100px;
            background-color: pink;
            text-align: center;
            line-height: 100px;
            font-weight: bolder;
            margin-top:10px;
            transition: 2s;
        }
        .i1{
            /* scale设定放大的比率 */
             transform: scale(0.5);
        }

        .i2{
            transform: translateX(1em);
        }

        .i3{
           transform: rotate(20deg);
        }

        .i4:hover{
            transform: scale(3) ;
        }
        .i5:hover{
            transform: rotate(-180deg);
        }
    </style>
</head>
<body>
    <div class="item">1</div>
    <div class="item i1">2</div>
    <div class="item i2">3</div>
    <div class="item i3">4</div>
    <div class="item i4">5</div>
    <div class="item i5">6</div>
</body>
</html>